import java.util.Arrays;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Scanner;

public class Test16 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        char[][] array = new char[100][100];
        int x = 0;
        int y = 0;
        int p = 0;
        int[]arr = new int[100];
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
           if(ch == '"'){
               while (true) {
                   i++;
                   ch = str.charAt(i);
                   if(ch == '"'){
                       break;
                   }
                   array[x][y++] = ch;
                   arr[p] = y;
               }
           }else {
                if(ch == ' '){
                  x++;
                  arr[p++] = y;
                  y = 0;
                }else {
                    array[x][y++] = ch;
                    arr[p] = y;
                }
            }
        }
        System.out.println(++x);
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < arr[i]; j++) {
                System.out.print(array[i][j]);
            }
            System.out.println();
        }
    }
}
